<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./node_modules/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <div>count:{{count}}</div>
    <div>double:{{double}}</div>
    <div><button @click="count++">测试</button></div>
  </div>
  <script>
    new Vue({
      el: "#app",
      data: {
        count:0,
      },
      computed: {
          // 计算属性
          double() {
            return this.count*2
          },
        },
    });
  </script>
</body>

</html>